/*
 * @Author: 郑刘利
 * @Date: 2020-03-18 00:18:07
 * @LastEditors: 郑刘利
 * @LastEditTime: 2020-03-18 15:33:20
 * @Description: file content
 * @FilePath: \one_project\src\core\services\SocialService.ts
 */
import { Signal, SignalType, ISignal } from '../domain/social/Signal';
import { fetchSignalList } from './api/RequestApi';
import { Limiter } from './Limiter';
interface SignalListData extends Limiter {
    list: ISignal[];
}
export class SocialService {
    public async getSignalList(limiter: Omit<Limiter, 'total'>, type: SignalType) {
        await setTimeout(() => {}, 100);
        const data = (await fetchSignalList(limiter.limit, limiter.count, type)) as SignalListData;
        const signal = data.list.map((base) => Signal.getInstance(base, { content: base }));

        return signal;
    }

    public async getSignal(id: string) {}

    public async getEcho(id: string) {}
}
